
//	var postRestService = function(URL, object){
//		
//		var restService = dojox.rpc.Rest(URL);
//		restService.post("", object);
//	};
	
	var savaAs = function(URL, object){
		
		var xhrArgs = {
			      url: URL,
			      headers: {
			          "Content-Type": "application/json",
			        },
			      postData: dojo.toJson(object),
			      handleAs: "json",//"text",
			      load: function(data){
			        console.log("SaveAs: " +  object);
			      },
			      error: function(error){
			        // We'll 404 in the demo, but that's okay.  We don't have a 'postIt' service on the
			        // docs server.
			        //dojo.byId("response2").innerHTML = "Message posted.";
			      }
			    };
			   
			    dojo.xhrPost(xhrArgs);
	};
	
	var loadProjects = function(url){
			
			var xhrArgs = {
				    url: url,
				    handleAs: "text",
				    load: function(data){
				    	showAllProject(data);
				    },
				    error: function(error){
				    }
				  };
			dojo.xhrGet(xhrArgs);
	};
	
	var wsGet = function(url, callback){
		
		var xhrArgs = {
			    url: url,
			    handleAs: "text",
			    load: function(data){
			    	callback(data);
			    },
			    error: function(error){
			    }
			  };
		dojo.xhrGet(xhrArgs);
	};
	
	var wsPost = function(url, object, callback, header){
		
		var xhrArgs = {
			    url: url,
			    handleAs: "text",
			    headers: header,
			    postData: dojo.toJson(object),
			    load: function(data){
			    	callback(data);
			    },
			    error: function(error){
			    }
			  };
		dojo.xhrPost(xhrArgs);
	};